Fix error message to use correct params