FIXED: some minior bugs