Removed duplicate error in function call