Bugfixes

Signed-off-by: Xmister <xmisterhu@gmail.com>