Added column availability check. Still have to improve.