small bugfix in case of erroneous input from client, or exception