CLI WFLY-3005 and WFLY-3101

https://issues.jboss.org/browse/WFLY-3005
https://issues.jboss.org/browse/WFLY-3101

Thanks,
Alexey