Fixed bugs, which were pointed by collaborator