Bugfix for crash