Fixed some issues with the deliveries controller and update funmethod