Fixed majors bugs