todo item and cleaned up warning when logging undef