debugging and fix peek16() bug