more protection against edge cases