code bug fixes