Fixing razor api error