Fix wrong return error

ping @creack @crosbymichael