fixing some cap issues