Fixed basical bugs.