Delegate support
Fixed a bug that could cause read:maxLength: to return 0 when reading only from pushed bytes
Fix boundary checking