Corrected some bugs

Signed-off-by: Sanjo <Deundiak@gmail.com>