Fixes loadByProperties and minor fixes