fixing overwriting properties problem