Fixed found bugs