Fix hash comparison, display error instead of closing