fixed entity saving