fixing getPage() returning undefined, carousel going to second page on his own