Added some frontend error checks