Photo-gallery directive bugs fixed