fix type in error return