Fix for nil error