Fixed a bug on empy objects