Fixed GUI Code