Fix chunk_size_limit related bugs

* Use bytesize instead of size
* Fix comparison error between nil and fixnum
* Change weird one-line code