fixing some 'undefined' warnings