small adjustments (error handling)