Removed mixed return wp_error from register function. lessc sorts it out.