Fixing minnor bug