initial fix - however, jQuery complains for obj == undefined, couldn't fix this yet