I have the same problem on my 2001 accent (SOHC 1.5) and my MIL (check light) is on. So I did an OBD2 scan and these are the codes the scan retrieved: P0722, P0733 and P0734.
These are all transmission codes. P0733 & P0734 are related to the third gear and fourth gear system respectively. P0722 is related to the pulse generator and when this code is set, it holds in 2nd or 3rd gear as a fail-safe measure; ie. "stuck in 2nd or 3rd".
You can check if the pulse generator is at fault but more than likely you'll need either a new or rebuilt transmission. Another way to check is to drop down your transmission pan and see if there are metal shavings in the pan. If so, then the transmission is probably grinding away.
Me and my friend will be rebuilding ours when the weather gets a little warmer. It'll cost me $360 for the rebuild kit (inc clutches) and $260 for the torque converter.
Hope this helps.