Fixed payload size. Added tests.