Added some checks on object loading to eventualy fix #225