bug fixes for handling temp