fix function internal error warnings