fixing #3 - check and set command

This fixes the Cas command