fix function clause and raise call timeout