fixing some problems