fix _size detection and cleanup some stuff