fixed bug in chunk message
Added null checks for callbacks
corrected message parsing