- Fixed allocation

- Fixed test loop