Patch to prevent crash but it's not the right solution.