added boolean to deal with buggy transition once item has been clicked