Fixed null pointer exception bug... should call method on container only
after checking it's not null.