fixed minor bugs, including initial load