Fixed issue with invalid header sizes