fixed some problems