bugfixes for userdefined tags