Set buffer length at correct location

Added incompatible argument exception