fixes for undefined