Fixed an issue (assignment of current state was not correct), JavaDoc.