fixed a bug where skip levels and types were not taken into account