function guards are working (except objects, bug??)