Minor refactor for working with notice error