Fixed errors and warnings.