fixed inconsistent behaviour bug