fixed minor bug, fixed null values