Fixes bug with page not updating properly