Bug fixes

Signed-off-by: PulsarBlow <pulsarblow@gmail.com>