fixed bug in level