Fixed bugs with shld and stax