Fix some code bugs

Signed-off-by: Emirrah Hazelle Dogelio <em.dogelio@teamcodeflux.com>