Fixed param order issue that was causing some server crashes. Cleaned up some exception handing