Fix for BUG_11 and BUG_21