Fix for #133

 * objects are now copied and textures are updated correctly
 * also added function to debug objects