Bug Fix

Fix some errors