Compilation issue

Besides the compilation issue, I removed a warning and added sample folder as source folder for better behavior in Eclipse.