Fixed syntax error with rescue