fixed checkout script