fixed page refresh bug. still no tests.