error handling for incorrect buffer input