Fixed namespace bug and pagesize bugs