fix various bugs and wrong class names