fixed long standing bug