Fixed nil access in error.rb