fixed small programming issues.