Few bug fixes and strong bound checks