Bug fix with error