Fixing issue with method not allowed