Fixing some problems