Fixed logic and added alerts to view_wo - Issue #16