Bugfix for uncaught error