Implemented a global decode lock to prevent concurrent decode