refactor Resource.last_error to be cleaner
fix for stop_date