Fixing bugs for current conditions