fixed some incremental bugs