fixed bug introduced by previous commits