solves the crash, but not in a good way