Fixing issue with destination not being set properly server side