Slight bug fixes