Fix code mistakes