ugly bug fixed