fixed bug introduced by the previous patch