fixed issue with boolean switch in sample code not able to execute selector specified.