Wrong buffer type error corrected.