Bug when creating product categories

When I create product categories with sub-categores inside add product page they are not displayed correct. For example some sub-categories do not appear under their main category but when I look inside the Product Categories they display correct.