fixed 'undefined entity' error