fix getLivingEntityFrom and cleanup dLocation