fixing python state to int16