Fixed error when routing from startPage