revamp panel loading to get attributes right