Updated script to account for all current bug fixes.