Fixing some problems hopefully