Fixes code problems