fixed bug with hardcoded data size.