fixed #616 : removed extra function calls