Fix: #1192, #1171
Signed-off-by:KProvance <kevin.provance@gmail.com>