#1173 & #1162 fix
Signed-off-by:KProvance <kevin.provance@gmail.com>