Rest API now compiling -- but crashing at run time