fixed compilation errors in programs