fixed bug introduced from last commit