quick style and bug fixes