fix refresh not working (closes #1)