helpers to prevent all out crashing